<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
</head>
<body>
	<form action="" id="form1">
	<table width="690px" height="350px" border="0" align="center"
				cellpadding="3" cellspacing="1" bgcolor="#AEDEF4">
				<tr>
					<td align="center" bgcolor="#E2F7FE">
							<table width="99%" border="0" cellspacing="1" cellpadding="3">
								<tr style="height: 30px">
									<td width="20%" align="center"><strong>矫正单位:</strong></td>
									<td width="20%" align="left">
										<select name="jid" style="width: 172px; height: 30px" id="jid"></select>
									</td>
									
								</tr>	
								<tr style="height: 30px">
									<td width="20%" align="center"><strong>姓&nbsp;&nbsp;&nbsp;&nbsp;名:</strong></td>
									<td width="20%" align="left">
										<select name="pid" style="width: 172px; height: 30px" id="pid"></select>
									</td>
									
								</tr>
								
								<tr>
									<td width="20%" align="center"><strong>监管等级:</strong></td>
									<td width="25%" align="left">
										<select name="grade" value="请选择监管等级" style="width: 178px; height: 30px">
										  <option value="二级宽管">二级宽管</option>
										  <option value="一级宽管">一级宽管</option>
										  <option value="普管">普管</option>
										  <option value="一级严管">一级严管</option>
										  <option value="一级严管">二级严管</option>
										</select>
									</td>
								</tr>
								<tr>
									<td width="20%" align="center"><strong>报到频率:</strong></td>
                                    <td width="25%" align="left">
                                        <select name="frequency" value="请选择报到频率" style="width: 178px; height: 30px">
                                            <option value="每周一次">每周一次</option>
                                            <option value="每周二次">每周二次</option>
                                            <option value="每周三次">每周三次</option>
                                            <option value="每周四次">每周四次</option>
                                            <option value="每周五次">每周五次</option>
                                            <option value="每周六次">每周六次</option>
                                            <option value="每周七次">每周七次</option>
                                        </select>
                                    </td>
								</tr>
								<tr>
									<td width="20%" align="center"><strong>思想汇报:</strong></td>
									<td colspan="3"><textarea rows="3" cols="70" id="reason" name="report"></textarea></td>
								</tr>
								
							</table>
					</td>
				</tr>
	</table>
	</form>
    <script type="text/javascript">
        //显示司法所，监管等级和矫正人员下拉框
        var getList = function() {
            $('#jid').combobox({
                dataType : "json",
                url:'${request.contextPath}/grade/jselect',
                valueField:'id',
                textField:'name',
        //当司法所发生变化时，相应的矫正人员也随之发生变化
                onSelect:function (rec) {
                    $("#pid").combobox('clear');
                    $("#pid").combobox('reload','${request.contextPath}/grade/pselect?jid='+rec.id);
                },
		//当数据加载成功后，给司法所下拉框赋予初始值
                onLoadSuccess : function() {
                    $("#jid").combobox("setValue", "请选择矫正单位");
                }
            });
        //当数据加载成功后，给矫正人员下拉框赋予初始值
            $('#pid').combobox({
                dataType : "json",
                url:'${request.contextPath}/grade/pselect',
                valueField:'id',
                textField:'name',
                onLoadSuccess : function() {
                    $("#pid").combobox("setValue", "请选择矫正人");
                }
            });
        };
        //刚开始显示所有的司法所和所有矫正人员
        getList();
    </script>
</body>
</html>